#include"GlobalHeader.h"
#include"StdMsgQueue.h"


int main()
{
    while(1)
    {    
        MsgQ *q = MsgQueueInit("./", 1);
        printf("请输入你要发的消息类型：");
        int type = 0;
        scanf("%d", &type);
        printf("请输入你要发的消息内容：");
        char msg[100] = {0};
        scanf("%s", msg);
        if(WriteToMsgQ(q,type,msg,100)==false)
        {
            ClearMsgQ(q);
            return -1;
        }
    }
    return 0;
}